<template>
	<view class="productDetails" v-if="productDetailData!=null">
		<uninavbar title="商品详情" leftIcon='leftIcon' rightIcon='' rightText="" id="item0" />
		<scroll-view show-scrollbar="false" scroll-y="true" class="left-box" scroll-with-animation="true">
			<swiper v-if="slider.length > 0" class="swiper" :indicator-dots="true" :autoplay="false" :circular="true">

				<swiper-item v-for="(item, index) in slider" :key="index">
					<!-- 	<navigator class="item" hover-class="none" :url="'/pages/article/detail?id=' + item.id"> -->
					<image :lazy-load="true" :src="item" mode=""></image>
					<!-- <view class="title">
						<text>{{ item.title }}</text>
					</view> -->
					<!-- 	</navigator> -->
				</swiper-item>
			</swiper>
			<!-- 内容 -->
			<view :class="[productStyle]">


				<view :class="navShow==item.id?[navclass] :''" @tap="scrollToItem(item.id, item.top)"
					v-for="(item,index) in productNav" :key="index">
					<view>
						{{item.name}}
					</view>
				</view>

			</view>

			<view class="productinfo">
				<view class="price">
					<view class="priceNum">
						￥{{productDetailData.product.originalPrice}}
					</view>
					<view class="afterTheRoll" v-if="productDetailData.product.promotionPrice">
						<text class="afterTheRollText">特惠价¥</text> <text class="afterTheRollNum">
							{{productDetailData.product.promotionPrice}}</text>
					</view>

				</view>
				<view class="">
					{{productDetailData.product.name}}
					<view class="subTitle">
						{{productDetailData.product.subTitle}}
					</view>
				</view>

				<view class="productinfoDom">
					<!-- 		<view class="infoAddress">
					<image src="/static/images/productDetails/p1.png" mode=""></image>
					<view class="">
						上海 快递：免运费备份
						<view class="time">
							付款后3天内发货
						</view>
					</view>

				</view> -->
					<view class="infoColour">
						<image src="/static/images/productDetails/p2.png" mode=""></image>
						<view class="infoColourImg">
							{{skuStock}}
							<!-- 	<image src="" mode=""></image>
						<image src="" mode=""></image>
						<image src="" mode=""></image>
						<image src="" mode=""></image> -->

						</view>
						<view class="" @click="popupShow('skuStock')">

							共{{productDetailData.skuStockList.length}}种类型可选
						</view>
						<image class="radd" src="/static/images/productDetails/zk.png" mode=""></image>
					</view>
					<!-- 	<view class="infoType" @tap="parameter()">
					<image src="/static/images/productDetails/p3.png" mode=""></image>
					<view class="infoColourImg">
						网络类型 品牌…
					</view>
					<image class="radd" src="/static/images/productDetails/zk.png" mode=""></image>
				</view> -->
				</view>
				<!-- 	<view class="productinfoDom">
				<view class="title">
					门店
					<view class="titleR">
						共1家门店
						<image class="radd" src="/static/images/productDetails/zk.png" mode=""></image>
					</view>

				</view>
				<view class="infoAddress positioning">
					<image src="/static/images/productDetails/dw.png" mode=""></image>
					<view class="">
						{{productDetailData.brand.name}}
						<view class="time">
							静安区嘉里不夜城
						</view>
					</view>

				</view>
			</view> -->
				<!-- 	<view class="productinfoDom">
				<view class="title">
					评价（100+）
					<view class="titleR">
						<image class="radd" src="/static/images/productDetails/zk.png" mode=""></image>
					</view>
				</view>

				<view class="commentTip">
					<view class="">
						信息很强(34)
					</view>
					<view class="">
						性价比高(43)
					</view>

				</view>
				<view class="commentDom">
					<view class="commentInfo">
						<image src="/static/images/tx.png" mode=""></image>
						爱**陈
					</view>

					<view class="commentText">
						续航：14Pro续航四个多小时，玩到0度电的话可以五个多小时，日常使用打游戏的话不好说，充电1.30分钟左右…
					</view>
					<view class="commentType">
						机身颜色:14Pro Max 暗夜紫 6.7;存储容量:56GB;套餐类型:套餐二…
					</view>
				</view>

				<view class="commentDom">
					<view class="commentInfo">
						<image src="/static/images/tx.png" mode=""></image>
						爱**陈
					</view>

					<view class="commentText">
						续航：14Pro续航四个多小时，玩到0度电的话可以五个多小时，日常使用打游戏的话不好说，充电1.30分钟左右…
					</view>
					<view class="commentType">
						机身颜色:14Pro Max 暗夜紫 6.7;存储容量:56GB;套餐类型:套餐二…
					</view>
				</view>

			</view> -->
				<view class="babyDetails" id="item1">
					宝贝详情
					<view class="babyDetailsText">
						<parser :html="productDetailData.product.detailHtml"></parser>
						<parser :html="productDetailData.product.detailMobileHtml"></parser>
					</view>
				</view>
				<!-- 	<view class="recommend">
				<view class="recommendTitle">
					推荐
				</view>
				<articleList :list="list" />
			</view> -->
			</view>
			<view class="productJoin">

				<view class="joinBtn">
					<view class="" @tap="gateTo('shoppingCart')">
						<image src="/static/images/productDetails/add1.png" mode=""></image>
						<view class="">
							购物车
						</view>
					</view>
					<view class="" @tap="gateTo('service')">
						<image src="/static/images/productDetails/add2.png" mode=""></image>
						<view class="">
							客服
						</view>
					</view>
					<view class="" @tap="collectionA()">
						<image src="/static/images/productDetails/add3.png" mode="" v-if="!CollectionShow"></image>
						<image src="/static/images/icon_favorite_hover.png" mode="" v-else></image>
						<view class="">
							收藏
						</view>

					</view>
				</view>
				<view class="joinBtn">
					<view class="joinCart" @click="popupShow('addToCart')">
						加入购物车
					</view>
					<view class="joinBuy" @click="popupShow('buy')">
						购买
					</view>
				</view>

			</view>
		</scroll-view>
		<uni-popup :show="show" @close="show = false" :is-mask-click="false" ref="popup" type="bottom"
			borderRadius="10px 10px 0 0">
			<!-- 弹出内容 -->
			<view class="popupInfo">
				<image :src="productDetailData.product.pic" mode=""></image>
				¥ <text>{{productDetailData.product.price}}</text>
				<view class="popupHide" @tap="show = false">
					<image src="/static/images/guanbi.png" mode=""></image>
				</view>
			</view>
			<!-- 	<view class="popupAddress">

				<image src="/static/images/productDetails/dw.png" mode=""></image>
				<view class="popupAddressText">
					深圳市 福田区 华强北街道
				</view>
				<image src="/static/images/productDetails/zk.png" mode=""></image>
			</view> -->
			<view class="popupTypeList">
				<view class="popupTypeTitle">
					商品类型
				</view>
				<view class="popuptip">
					<view :class="colourType==item.id?'popuptipShow':''" v-for="(item,index) in skuStockList"
						:key="index" @tap="colourDom(item)">

						<text class="" v-for="(item,index) in item.spData">
							{{item.value}}
						</text>
					</view>

				</view>

			</view>
			<!-- 	<view class="popupTypeList" v-for="(item,indexProduct) in parameterList">
				<view class="popupTypeTitle">
					{{item.name}}
				</view>

				<view class="popuptip">
					<view :class="skuItem.showDom? 'popuptipShow':''" v-for="(skuItem,skuIndex) in item.skuStock"
						:key="skuItem.id" @tap.stop="parameterTap(skuItem,skuIndex,indexProduct)">
						{{skuItem.value}}
					</view>

				</view>

			</view> -->
			<!-- 	<view class="popupTypeList">
				<view class="popupTypeTitle">
					版本
				</view>
				<view class="popuptip">
					<view :class="networkType==item.id?'popuptipShow':''" v-for="(item,index) in networkList"
						:kes='index' @tap="networkDom(item)">
						{{item.name}}
					</view>
				</view>

			</view> -->
			<view class="popupTypeList popupNum">
				<view class="">
					购买数量
				</view>
				<view class="numBtn">
					<view class="minusBtn" @tap="minusNumDom()">-</view>
					<view class="numInput">
						<input type="number" value="" v-model="numInput" />
					</view>
					<view class="addNumBtn" @tap="addNumDom()">
						+
					</view>
				</view>

			</view>
			<view class="popupAddBtn" v-if="popupType=='addToCart'" @tap="cartAdd()">
				加入购物车
			</view>
			<view class="popupAddBtn buyBtn" v-else-if="popupType=='skuStock' " @tap="cartAdd()">
				加入购物车
			</view>
			<view class="popupAddBtn buyBtn" v-else @tap="popup()">
				立即支付¥{{this.productDetailData.product.price}}
			</view>
		</uni-popup>
		<!-- 	<uni-popup :show="parameterShow" @close="parameterShow = false" ref="popup" type="bottom"
			borderRadius="10px 10px 0 0">
			<view class="" v-for='(item,index) in this.productAttributeList' v-if="item.type==1">
				
					
					<view class="" v-if="item.inputList!=''">
						{{item.name}} {{item.inputList}}
					</view>
			</view>
		</uni-popup> -->
	</view>
</template>

<script>
	import uninavbar from '@/components/uni-nav-bar/uni-nav-bar.vue';
	import articleList from '@/components/article/list.vue';
	import API from '@/config/newApi.js'
	import {
		nextTick
	} from "vue";
	export default {
		components: {
			uninavbar,
			articleList,

		},
		data() {
			return {

				parameterShow: false,
				colourType: '1',
				memoryType: "1",
				networkType: "1",
				networkList: [{
					name: '4G合约版',
					id: '1'
				}, {
					name: '5G合约版',
					id: '2'
				}, {
					name: '无需合约版',
					id: '3'
				}],
				popupType: '',
				show: false, // 控制弹出状态
				rightIcon: "",
				slider: [],
				list: [],
				navShow: 'item0',
				numInput: 1,
				navclass: "productNavShow",
				productStyle: 'productNav',
				productDetailId: '',
				productDetailData: null,
				skuStockList: [],
				parameterList: [],
				productAttributeList: [],
				skuStock: "",
				spData: '',
				skuCode: '',
				CollectionShow: false,
				productNav: [{
						name: '宝贝',
						id: 'item0',
						top: 0,
					},
					// {
					// 	name: '评价',
					// 	id: '1'
					// }, 
					{
						name: '详情',
						id: 'item1',
						top: 470,
					}, // {
					// 	name: '推荐',
					// 	id: '3'
					// }
				],
			};
		},
		onLoad() {
			console.log(this.$store.state.token)
			this.productDetailId = this.$route.query.id;
			this.productDetail()
			this.productCollectionDetail()
			
		},
		onPageScroll(e) {
			// e.scrollTop 获取当前滚动条的位置
			if (e.scrollTop > 100) { // 这里设置一个阈值来判断是否接近顶部，因为理论上scrollTop为0时可能存在细微误差
				this.productStyle = 'productNav productNavfixed'
				// 在这里执行你的逻辑
			} else {
				this.productStyle = 'productNav'
				this.navShow = 'item0'
			}
		},
		methods: {
			scrollToItem(id, top) {
				this.navShow = id
				this.navclass = 'productNavShow'
				this.$nextTick(() => {
					uni.pageScrollTo({
						selector: `#${id}`, // 指定要滚动到的元素的ID
						scrollTop: top,
						duration: 300 // 滚动动画的时长，单位ms
					});
				});
			},
			productNavShow(id) {

			},
			parameterTap(skuItem, skuIndex, indexProduct) {

				this.show = false
				for (let item of this.parameterList[indexProduct].skuStock) {
					item.showDom = false
				}
				this.parameterList[indexProduct].skuStock[skuIndex].showDom = !this.parameterList[indexProduct].skuStock[
					skuIndex].showDom
				let skuItemShowList = []
				for (let item of this.parameterList) {
					for (skuItem of item.skuStock) {
						if (skuItem.showDom) {
							skuItemShowList.push(skuItem)
						}
					}
				}
				for (let item of this.skuStockList) {
					for (let spDataItem of item.spData) {
						for (let skuItemShow of skuItemShowList) {
							if (spDataItem.key == skuItemShow.key && spDataItem.value == skuItemShow.value) {
								console.log(skuItemShow, 'fffff')
							}
						}

						// if (spDataItem.key==skuItem.key) {
						// 	console.log(spDataItem)
						// }
					}
				}
				// for (let skuItemShow of skuItemShowList) {


				// }
				this.show = true

			},
			productCollectionDetail() {
				let data = {
					productId: this.productDetailId
				}
				let args = {
					ContentType: 'application/json'
				}
				API.productCollectionDetail(data, args).then(res => {
						if (res.code == 200) {
							if (res.data) {
								this.CollectionShow = res.data.status
							}

						}
					})
					.catch(err => {
						console.log(err)
					})
			},

			collectionA() {
				if (this.CollectionShow) {
					this.productCollectionDelete()
				} else {
					this.productCollectionAdd()
				}
			},
			productCollectionAdd() {
				let data = {
					productId: this.productDetailData.product.id,
					productName: this.productDetailData.product.name,
					productPic: this.productDetailData.product.pic,
					productPrice: this.productDetailData.product.price,
					productSubTitle: this.productDetailData.product.subTitle,
				}
				let args = {
					ContentType: 'application/json'
				}
				API.productCollectionAdd(data, args).then(res => {

						if (res.code == 200) {
							this.CollectionShow = !this.CollectionShow
							this.$alert(res.message);
						}


						if (res.code == 401) {
							this.$alert('请登录后收藏');
							setTimeout(() => {
								uni.navigateTo({
									url: '/pages/common/login'
								});
							}, 1500);

						}
					})
					.catch(err => {
						console.log(err)
					})
			},
			productCollectionDelete() {
				let data = {
					productId: this.productDetailId
				}
				let args = {
					ContentType: 'application/json'
				}
				API.productCollectionDelete(data, args).then(res => {
						if (res.code == 200) {
							this.CollectionShow = !this.CollectionShow
							this.$alert(res.message);
						}

						if (res.code == 401) {
							this.$alert('请登录后收藏');
							setTimeout(() => {
								uni.navigateTo({
									url: '/pages/common/login'
								});
							}, 1200); // 延
						}
					})
					.catch(err => {
						console.log(err)
					})
			},
			parameter() {
				this.parameterShow = !this.parameterShow
			},

			gateTo(type) {
				if (type == 'shoppingCart') {
					uni.switchTab({
						url: '/pages/user/shoppingCart'
					});
				} else {
					uni.navigateTo({
						url: '/pages/user/service'
					});
				}

			},
			cartAdd: function() {
				let data = {
					price: this.productDetailData.product.price,
					productAttr: this.spData,
					productBrand: this.productDetailData.brandName,
					productCategoryId: this.productDetailData.product.productCategoryId,
					productId: this.productDetailData.product.id,
					productName: this.productDetailData.product.name,
					productPic: this.productDetailData.product.pic,
					productSkuCode: this.skuCode,
					productSkuId: this.colourType,
					productSn: this.productDetailData.product.productSn,
					productSubTitle: this.productDetailData.product.subTitle,
					quantity: this.numInput,
				}
				let args = {
					ContentType: 'application/json'
				}
				API.cartAdd(data, args).then(res => {

						if (res.code == 200) {

							this.$alert(res.message);
						} 
						if (res.code == 401) {
							this.$alert('请登录后加入');
							setTimeout(() => {
								uni.navigateTo({
									url: '/pages/common/login'
								});
							}, 1200); // 延
						}
						this.show = false
					})
					.catch(err => {
						console.log(err)
					})
			},
			productDetail: function() {
				let data = {
					// pageNum=1&pageSize=4
				}
				API.productDetail(this.productDetailId).then(res => {

						if (res.code == 200) {
							this.productAttributeList = res.data.productAttributeList //参数列表
							if (res.data.product.albumPics != '') {
								let tempPics = res.data.product.albumPics.split(',');
								console.log(tempPics)
								this.slider = this.slider.concat(tempPics)
							}
							this.productDetailData = res.data
							this.slider.push(res.data.product.pic)
							console.log(this.slider)
							for (let item of this.productAttributeList) { //循环获取可选参数
								if (item.type == 0) { //type=0 可选择参数
									item['skuStock'] = []
									this.parameterList.push(item)

								}
								for (let valueListitem of res.data.productAttributeValueList) {
									if (valueListitem.productAttributeId == item.id) {
										item['skuStockValue'] = valueListitem.value
									}
								}
							}
							console.log(this.productAttributeList)
							for (let item of res.data.skuStockList) {
								item.spData = JSON.parse(item.spData)
								for (let spDataItem of item.spData) {
									spDataItem['showDom'] = false
									for (let parameterItem of this.parameterList) {
										if (spDataItem.key == parameterItem.name) {
											parameterItem.skuStock.push(spDataItem)

										}
									}
								}

							}
							let uniqueArr = []
							for (let item of this.parameterList) {
								// 假设我们要根据 'id' 属性去重
								uniqueArr = item.skuStock.filter((item, index, self) => {
									return self.findIndex(t => t.value === item.value) === index;
								});
								item.skuStock = uniqueArr
							}
							this.skuStockList = res.data.skuStockList
							this.skuStock = this.skuStockList[0].spData[0].value
							this.colourType = this.skuStockList[0].id
							this.productAttributeList = res.data.productAttributeList

						}
					})
					.catch(err => {
						console.log(err)
					})
			},
			popup() {
				if(this.$store.state.token==''){
					this.show = false
					this.$alert('请登录后购买');
					setTimeout(() => {
						uni.navigateTo({
							url: '/pages/common/login'
						});
					}, 1200); // 延
				}else{
					uni.navigateTo({
						url: '/order/orderIndex?CartIds=' + this.colourType + '&urlType=goodsCart' + '&quantity=' +
							this.numInput
					})
				}
				
				
			},
			minusNumDom() {
				if (this.numInput > 1) {
					this.numInput--
				}
			},
			addNumDom() {
				this.numInput++
			},
			networkDom(item) {
				this.networkType = item.id
			},
			memoryDom(item) {
				this.memoryType = item.id
			},
			colourDom(item) {
				console.log(item)
				this.skuStock = item.spData[0].value + item.spData[1].value
				this.productDetailData.product.price = item.price
				this.skuCode = item.skuCode
				this.spData = JSON.stringify(item.spData)
				this.colourType = item.id
			},
			popupShow(type) {
				this.popupType = type
				this.show = !this.show
				this.skuCode = this.skuStockList[0].skuCode
				this.spData = JSON.stringify(this.skuStockList[0].spData)
				this.colourType = this.skuStockList[0].id
			},
			/*获取数据*/
			// getData() {
			// 	this.$app.request({
			// 		url: this.$api.article.index,
			// 		data: {
			// 			category_id: 1,
			// 			page_index: 1,
			// 			page_size: 5
			// 		},
			// 		method: 'POST',
			// 		dataType: 'json',
			// 		success: res => {
			// 			if (res.code == 0) {

			// 				if (this.slider.length == 0) {
			// 					this.slider = res.data.slider;
			// 				}
			// 				this.list = this.list.concat(res.data.list)
			// 			} else {

			// 				this.$alert(res.msg);
			// 				setTimeout(() => {
			// 					uni.navigateTo({
			// 						url: "/pages/common/login"
			// 					})
			// 				}, 2000); // 延迟2000毫秒（2秒）后执行
			// 			}
			// 		},
			// 		fail: res => {
			// 			this.scroller.endErr();
			// 		},
			// 		complete: res => {
			// 			uni.stopPullDownRefresh();
			// 			uni.hideLoading();
			// 		}
			// 	});
			// },
		}
	}
</script>

<style scoped lang="scss">
	.productDetails {
		background: #F9F9F9;

		::v-deep .uni-popup__wrapper-box {
			border-radius: 16px 16px 0px 0px;
		}
	}

	/*幻灯片广告 */
	.swiper {
		height: 600rpx;
		padding-top: 90rpx;

		::v-deep .uni-swiper-dot {
			width: 40rpx;
			height: 4px;
			background: #D2D2D2;
			border-radius: 2px;
		}

		::v-deep .uni-swiper-dot-active {
			width: 40rpx;
			height: 4px;
			background: #6954D5;
			border-radius: 2px;
		}

		image {
			height: 600rpx;
			width: 100%;
			//box-shadow: 0 0 12px #dddee1;
		}

		.current {
			width: 97%;
			height: 600rpx;
			margin: 1.5% 1.5%;
			transition: all 0.2s ease-in 0s;
		}

		.item {
			position: relative;

			.title {
				position: absolute;
				left: 0;
				bottom: 0;
				display: flex;
				justify-content: center;
				width: 100%;

				text {
					margin: 7% 6%;
					display: flex;
					align-items: center;
					//background-image: linear-gradient(to right, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3));
					//background-image: linear-gradient(90deg,rgba(255, 181, 19,.8),rgba(255, 181, 19,.2));
					color: #fff;
					display: -webkit-box;
					text-overflow: ellipsis;
					word-break: break-all;
					-webkit-line-clamp: 2;
					-webkit-box-orient: vertical;
					overflow: hidden;
					font-size: 34rpx;
					padding: 14rpx 20rpx;
					max-width: 610rpx;
					line-height: 1.3;
					border-radius: 5rpx;
				}
			}
		}
	}

	.productinfo {
		padding: 20rpx;
		padding-bottom: 160rpx;

		.subTitle {
			color: #666;
			font-size: 24rpx;
		}
	}

	.productinfoDom {
		background-color: #F9F9F9;
		padding: 0 20rpx;
		border-radius: 16rpx;
		margin-bottom: 20rpx;
		overflow: hidden;
	}

	.infoAddress,
	.infoColour,
	.infoType {
		display: flex;
		align-items: center;
		width: 100%;
		color: #333;
		position: relative;
		padding: 20rpx 0;
		border-bottom: 2rpx solid rgba(221, 221, 221, 0.87);
		font-size: 28rpx;

		image {
			width: 40rpx;
			height: 40rpx;
			margin-right: 20rpx;
		}

		.time {
			font-size: 20rpx;
		}

		.radd {
			width: 20rpx;
			height: 20rpx;
			position: relative;
			right: 0;
			margin-right: 0rpx;
		}

	}

	.infoType {
		border-bottom: none;
	}

	.price {
		color: #6954D5;
		display: flex;
		align-items: center;
		margin-bottom: 10rpx;

		.priceNum {
			font-size: 36rpx;
		}

		.afterTheRoll {
			background-color: #6954D5;
			color: #fff;
			border-radius: 20px;
			border: 1px solid #6954D5;
			padding: 0 40rpx;
			display: flex;
			align-items: center;
			margin-left: 20rpx;

			.afterTheRollText {
				font-size: 22rpx;
			}

			.afterTheRollNum {
				font-size: 36rpx;
			}
		}
	}

	.infoColourImg {
		flex: 1;
	}

	.title {
		display: flex;
		align-items: center;
		justify-content: space-between;
		border-bottom: 2rpx solid rgba(221, 221, 221, 0.87);
		padding: 20rpx 0;
	}

	.titleR {
		display: flex;
		align-items: center;
		font-size: 10rpx;

		image {
			width: 20rpx;
			height: 20rpx;
		}
	}

	.positioning {
		border-bottom: none;
	}

	.commentTip {
		display: flex;
		flex-wrap: wrap;
		margin: 20rpx 0;

		view {
			border: #6954D5 2rpx solid;
			border-radius: 8px;
			font-size: 24rpx;
			color: #6954D5;
			background: #F3F2FC;
			padding: 0 10rpx;
			margin-right: 20rpx;
		}
	}

	.commentDom {
		margin-bottom: 40rpx;

		.commentInfo {
			display: flex;
			align-items: center;
			margin-bottom: 15rpx;

			image {
				width: 50rpx;
				height: 50rpx;
				margin-right: 20rpx;
			}
		}

		.commentText {
			font-size: 26rpx;
			display: -webkit-box;
			text-overflow: ellipsis;
			word-break: break-all;
			-webkit-line-clamp: 2;
			-webkit-box-orient: vertical;
			overflow: hidden;
			margin-bottom: 10rpx;
		}

		.commentType {
			font-size: 20rpx;
			color: #888888;
			display: -webkit-box;
			text-overflow: ellipsis;
			word-break: break-all;
			-webkit-line-clamp: 1;
			-webkit-box-orient: vertical;
			overflow: hidden;
		}
	}

	.babyDetails {
		text-align: center;
		padding-bottom: 20rpx;
		font-size: 12px;
		color: #999999;

		.babyDetailsText {
			min-height: 500rpx;
		}
	}

	.recommendTitle {
		text-align: center;
		font-size: 32rpx;
	}

	.productNav {

		display: none;

		view {
			cursor: pointer;
		}

		.productNavShow {
			color: #6954D5;
			border-bottom: 4rpx solid #6954D5;
			position: relative;
		}

		.productNavRelative {
			position: relative;
		}
	}

	.productNavfixed {
		width: 100%;
		display: flex;
		align-items: center;
		text-align: center;
		padding: 30rpx 40rpx;
		justify-content: space-evenly;
		box-sizing: border-box;
		background-color: #fff;
		top: 0;
		max-width: 800rpx;
		position: fixed;
		z-index: 99;

	}

	.productJoin {
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: space-between;
		position: fixed;
		bottom: 0;
		background-color: #fff;
		z-index: 9;
		padding: 40rpx;
		box-sizing: border-box;
		max-width: 800rpx;

		.joinBtn {

			display: flex;
			width: 330rpx;
			align-items: center;
			justify-content: space-around;
			text-align: center;
			font-size: 22rpx;
			line-height: 28rpx;
			color: #666;

			image {
				width: 38rpx;
				height: 38rpx;
			}

			.joinCart,
			.joinBuy {
				height: 50rpx;
				padding: 15rpx 10rpx;
				width: 50%;
				line-height: 50rpx;
			}

			.joinCart {
				background: #F3F2FC;
				border-radius: 100px 0px 0px 100px;
				color: #6954D5;

			}

			.joinBuy {
				background: #6954D5;
				border-radius: 0px 68px 68px 1px;
				color: #fff;
			}
		}
	}

	.popupInfo {
		display: flex;
		align-items: center;
		position: relative;
		color: #6954D5;
		font-size: 36rpx;

		image {
			width: 80rpx;
			height: 80rpx;
		}

		.popupHide {
			background-color: none;
			position: absolute;
			right: 0;
			top: 0;
			width: 40rpx;
			height: 40rpx;

			image {
				width: 100%;
				height: 100%;
			}
		}
	}

	.popupAddress {
		display: flex;
		align-items: center;
		width: 100%;
		border-bottom: 2rpx solid rgba(221, 221, 221, 0.87);
		margin-bottom: 20rpx;
		padding-bottom: 20rpx;

		.popupAddressText {
			flex: 1;
		}

		image {
			width: 30rpx;
			height: 30rpx;
			margin-right: 10rpx;
		}
	}

	.popupTypeList {
		border-bottom: 2rpx solid rgba(221, 221, 221, 0.87);
		padding: 20rpx 0;

		.popuptip {

			display: flex;
			flex-wrap: wrap;

			view {
				background: rgba(153, 153, 153, 0.1);
				border-radius: 8px;
				color: #666;
				font-size: 24rpx;
				padding: 5rpx 20rpx;
				margin-right: 20rpx;
				margin-top: 10rpx;
				border: 2rpx solid rgba(153, 153, 153, 0.1)
			}

			.popuptipShow {
				border: #6954D5 2rpx solid;
				color: #6954D5;
				background: #F3F2FC;

			}
		}
	}

	.popupNum {
		display: flex;
		align-items: center;
		justify-content: space-between;
		border-bottom: none
	}

	.popupAddBtn {
		width: 520rpx;
		height: 80rpx;
		background: #F3F2FC;
		border-radius: 20px;
		color: #6954D5;
		text-align: center;
		line-height: 80rpx;
		margin: auto;
		margin-top: 100rpx;
		cursor: pointer;
	}

	.buyBtn {
		background: #6954D5;
		color: #fff;
	}

	.numBtn {
		display: flex;

		.minusBtn,
		.addNumBtn {
			width: 60rpx;
			height: 60rpx;
			text-align: center;
			line-height: 60rpx;
			background: rgba(153, 153, 153, 0.1);
			font-size: 36rpx;
			cursor: pointer;
		}

		.numInput {
			width: 100rpx;
			height: 60rpx;
			display: flex;
			align-items: center;
			background: rgba(153, 153, 153, 0.1);
			text-align: center;
			line-height: 60rpx;
		}
	}
</style>